package com.mingyuan.library.provider.lending.model.command;

import com.mingyuan.library.domain.lending.patron.model.valueobject.HoldDuration;
import com.mingyuan.library.domain.lending.patron.model.valueobject.NumberOfDays;
import com.mingyuan.library.provider.common.dto.Command;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.vavr.control.Option;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.UUID;

/**
 * 预定图书命令请求参数
 * @author yangzk
 * @version 1.0.0
 * @date 2024.01.05 19:43
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "预定图书命令参数")
public class PlaceHoldCommand extends Command implements Serializable {
    private static final long serialVersionUID = -5043202235552380213L;

    /**
     * 读者ID
     */
    @NotBlank(message = "读者ID不能为空")
    @ApiModelProperty(name = "patronId", value = "读者ID", required = true)
    private UUID patronId;
    /**
     * 图书ID
     */
    @NotBlank(message = "图书ID不能为空")
    @ApiModelProperty(name = "bookId", value = "图书ID", required = true)
    private UUID bookId;
    /**
     * 图书馆分馆ID
     */
    @NotBlank(message = "图书馆分馆ID不能为空")
    @ApiModelProperty(name = "libraryBranchId", value = "图书馆分馆ID", required = true)
    private UUID libraryBranchId;
    /**
     * 预定天数
     */
    @NotNull(message = "预定天数不能为空")
    @ApiModelProperty(name = "numberOfDays", value = "预定天数")
    private Integer numberOfDays;

}
